<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Song extends Model
{
    protected $autoWriteTimestamp = 'datetime';
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';
    //
    public function singer(){
        return $this->belongsTo(Singers::class,'singer_id','id');
    }

    public function getFileUrlAttr($value)
    {
        return env('storage.hosts') . $value;
    }
}
